from django.db import models
from luffyapi.settings import contants
# Create your models here.
from luffyapi.utils.models import BaseModel
from django.contrib.auth.models import AbstractUser
class User(AbstractUser):
    mobile = models.CharField(max_length=15, unique=True, verbose_name="手机号码")
    avatar = models.ImageField(upload_to="avatar", null=True, blank=True, verbose_name="头像")
    wechat = models.CharField(max_length=100, null=True,blank=True, verbose_name="微信号")
    credit = models.IntegerField(default=0, null=True, blank=True, verbose_name="用户积分",help_text="用户积分换算比例： 1RMB=%s积分[如果要修改积分兑换比例，请通知开发人员到setings/constants中进行修改]" % contants.RMB_CREDIT)
    class Meta:
        db_table = 'ly_users'
        verbose_name = '用户'
        verbose_name_plural = verbose_name
